﻿@model EscolaIade.Models.Pessoa

@{
    ViewBag.Title = "Criar Aluno";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section featured {
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1>@ViewBag.Title.</h1>
                <h2>@ViewBag.Message</h2>
            </hgroup>
            <p>
                @ViewBag.Description
            </p>
        </div>
    </section>
}

@using (Html.BeginForm("CreateAluno","Pessoas",FormMethod.Post,new { enctype = "multipart/form-data" })) {
    @Html.ValidationSummary(true)
  
<div class="accordion">
        <h3><a href="#">Dados Pessoais do Aluno</a></h3>
        <div>
            <table border='0'>
                <tr>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.NOME)
                        </div>        
                    </td>
                    <td>
                       <div class="editor-field">
                            @Html.EditorFor(model => model.NOME)
                            @Html.ValidationMessageFor(model => model.NOME)
                        </div>      
                    </td>
                    <td rowspan="5">
                        <div class="editor-field">
                        </div>
                           
                            <div class="editor-field">
                                <div>Carregar Foto: <input type="file" name="Image" /></div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.DATA_DE_ANIVERSARIO)
                        </div>
                    </td>
                    <td>
                        <div class="editor-field">
                            @Html.TextBoxFor(model => model.DATA_DE_ANIVERSARIO, new {@class="date" })
                            @Html.ValidationMessageFor(model => model.DATA_DE_ANIVERSARIO)
                        </div>
                    </td>
                
                </tr>
                <tr>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.LOCAL_NASCIMENTO)
                        </div>
                    </td>
                    <td>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.LOCAL_NASCIMENTO)
                            @Html.ValidationMessageFor(model => model.LOCAL_NASCIMENTO)
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.TELEFONE)
                        </div>
                    </td>
                    <td>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.TELEFONE)
                            @Html.ValidationMessageFor(model => model.TELEFONE)
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.CELULAR)
                        </div>
                    </td>
                    <td>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.CELULAR)
                            @Html.ValidationMessageFor(model => model.CELULAR)
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.SEXO)
                        </div>
                    </td>
                    <td>
                        <div class="editor-field">
                            @Html.DropDownListFor(model => model.SEXO, new[]
                                    {
                                       new SelectListItem() {Text = "Masculino", Value = "0", Selected=Model.SEXO==0},
                                       new SelectListItem() {Text = "Feminino", Value = "1", Selected=Model.SEXO==1}
                                    }, new { @class="combobox"}
                            )
                            @Html.ValidationMessageFor(model => model.SEXO)
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.MORADA)
                        </div>
                    </td>
                    <td>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.MORADA)
                            @Html.ValidationMessageFor(model => model.MORADA)
                        </div>
                    </td>
                </tr>
            </table>
        </div>
       

        <h3><a href="#"> Dados dos Responsaveis</a></h3>
    
        <div>
        <table>
            <tr>
                <td>Pai: </td>
                <td> 
                    @Html.TextBox("pai", "")
                    @Html.ValidationMessage("")
                </td>
                
                <td>Telefone do Pai: </td>

                <td>
                    @Html.TextBox("telefonePai", "")
                    @Html.ValidationMessage("")
                </td>
            </tr>
            <tr>

                <td>Mãe: </td>
                <td> 
                   @Html.TextBox("mae", "")
                   @Html.ValidationMessage("")
                </td>
                
                <td>Telefone do Mãe: </td>

                <td>
                    @Html.TextBox("telefoneMae", "")
                    @Html.ValidationMessage("")
                </td>
            </tr>
            <tr>

                <td>Enc. Educação: </td>
                <td> 
                   @Html.TextBox("encEducacao", "")
                   @Html.ValidationMessage("")
                </td>
                
                <td>Telefone do Enc. Educação:   </td>

                <td>
                   @Html.TextBox("telefoneEncEducacao", "")
                   @Html.ValidationMessage("")
                </td>
            </tr>
        </table>
 </div></div>
    
    <p>
        <input type="submit" value="Criar" />
    </p>
}


<div>
    @Html.ActionLink("Voltar a Lista de Alunos", "IndexAlunos")
</div>
